﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace StyleMVVM.Logging
{
	public sealed class LogWrapper : ILogWrapper
	{
		private readonly ILog logger;
		private readonly string supplementalName;

		public LogWrapper(ILog logger, Type wrappingType)
		{
			this.logger = logger;
			supplementalName = wrappingType.FullName;
		}

		public void Debug(string message)
		{
			logger.Debug(message, supplementalName, null);
		}

		public void Debug(string message, Exception exp)
		{
			logger.Debug(message, supplementalName, exp);
		}

		public void Info(string message)
		{
			logger.Info(message, supplementalName, null);
		}

		public void Info(string message, Exception exp)
		{
			logger.Info(message, supplementalName, exp);
		}

		public void Warn(string message)
		{
			logger.Warn(message, supplementalName, null);
		}

		public void Warn(string message, Exception exp)
		{
			logger.Warn(message, supplementalName, exp);
		}

		public void Error(string message)
		{
			logger.Error(message, supplementalName, null);
		}

		public void Error(string message, Exception exp)
		{
			logger.Error(message, supplementalName, exp);
		}

		public void Fatal(string message)
		{
			logger.Fatal(message, supplementalName, null);
		}

		public void Fatal(string message, Exception exp)
		{
			logger.Fatal(message, supplementalName, exp);
		}
	}
}